package com.cqc.lite.dao;

import com.cqc.lite.domain.SysLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysLogDao {

    @Insert("insert into sysLog(visitTime,username,ip,url,executionTime,method)values(#{visitTime},#{username},#{ip},#{url},#{executionTime},#{method})")
    void save(SysLog sysLog);


    @Select("select * from SysLog")
    List<SysLog> findAll();

    @Select("select count(id) from SysLog")
    int findCount();

    @Select("select * from SysLog  limit #{offSet},#{pageSize}")
    List<SysLog> findAllByPage(@Param("offSet")int offSet, @Param("pageSize")int pageSize);
}
